-
Notifications
You must be signed in to change notification settings - Fork 62
update Snowflake setup README with step-by-step production guide #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8450ab6 to
723eae3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Snowflake setup with a comprehensive production deployment guide for AIFAQ Pro version 2. It introduces detailed configuration files and step-by-step instructions for deploying a Snowflake Native App with AI-powered FAQ capabilities.
Key changes:
- Added Snowflake deployment configuration (snowflake.yml, setup.sql, manifest.yml, environment.yml)
- Created extensive 470-line deployment and user guide
- Updated main README with improved architecture overview and folder structure descriptions
Reviewed changes
Copilot reviewed 78 out of 102 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| version_2/snowflake.yml | Snowflake Native App configuration defining package, application, artifacts, and deployment settings |
| version_2/setup.sql | Database schema initialization script creating tables, stages, indexes, and access controls |
| version_2/manifest.yml | Application metadata including privileges, resources, and marketplace configuration |
| version_2/environment.yml | Conda environment specification with Python dependencies for Snowflake execution |
| version_2/readme.md | Comprehensive deployment guide covering three deployment methods, troubleshooting, and marketplace publishing |
| README.md | Updated main documentation with refined architecture description and folder structure |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Route queries to Snowflake Cortex or external OpenSource LLM models through secure external functions. | ||
|
|
||
| - **Multi-Document Knowledge Retrieval** | ||
| Supports structred and unstructred data. |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "structred" should be "structured".
| Supports structred and unstructred data. | |
| Supports structured and unstructured data. |
| Route queries to Snowflake Cortex or external OpenSource LLM models through secure external functions. | ||
|
|
||
| - **Multi-Document Knowledge Retrieval** | ||
| Supports structred and unstructred data. |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "unstructred" should be "unstructured".
| Supports structred and unstructred data. | |
| Supports structured and unstructured data. |
| ## Folder Descriptions | ||
|
|
||
| ### `version_1/` | ||
| A simplified demonstration build intended for quick snowflake evaluation adn to get hands on for beginners. |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: "adn" should be "and".
| A simplified demonstration build intended for quick snowflake evaluation adn to get hands on for beginners. | |
| A simplified demonstration build intended for quick snowflake evaluation and to get hands on for beginners. |
| #### Step 3: Deploy Application | ||
| ```bash | ||
| # Navigate to project folder | ||
| cd project folder |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instructions refer to "project folder" without specifying which directory. Users need clear guidance on which directory to navigate to (likely version_2/ based on context). Consider changing this to "cd version_2" or being more explicit about the path.
| default_role: accountadmin | ||
|
|
||
| # Project structure | ||
| definition_version: "1" No newline at end of file |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The definition_version field is declared twice in this file - once at line 1 and again at line 44. This duplicate declaration should be removed as it can cause configuration parsing errors.
| @@ -0,0 +1,1008 @@ | |||
| import streamlit as st | |||
| from snowflake.snowpark.context import get_active_session | |||
| import uuid, re, datetime as dt | |||
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 're' is not used.
| from snowflake.snowpark.context import get_active_session | ||
| import uuid, re, datetime as dt | ||
| import pandas as pd | ||
| import io |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'io' is not used.
| """Get user documents""" | ||
| try: | ||
| return session.sql(f"SELECT DOC_ID, FILENAME, FILE_TYPE, FILE_SIZE, UPLOADED_AT FROM {DOCS_TBL} ORDER BY UPLOADED_AT DESC").to_pandas() | ||
| except: |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except block directly handles BaseException.
| messages.append({"role": "user", "content": r["QUERY_TEXT"]}) | ||
| messages.append({"role": "assistant", "content": r["RESPONSE_TEXT"]}) | ||
| return messages | ||
| except: |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except block directly handles BaseException.
| "messages": loaded_messages | ||
| } | ||
| st.rerun() | ||
| except Exception: |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
Signed-off-by: Jayaram007 <jairam.kumar23@gmail.com>
|
Merged thank you Jayaram! |
-Added detailed instructions for implementing Snowflake setup